package com.ybwh.springboot1.controller;

import com.ybwh.springboot1.annotation.LoginRequired;
import com.ybwh.springboot1.common.UserInfo;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * 主页面逻辑
 */
@LoginRequired
@Controller
@RequestMapping("/")
public class indexController {
	
	
	@RequestMapping("/index")
	public ModelAndView index(UserInfo userInfo) {
		ModelAndView mav = new ModelAndView("/index");
		mav.addObject("userInfo", userInfo);
		return mav;
	}

}
